Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gtm_datalayer.html #206

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Update gtm_datalayer.html #206

merged 2 commits into from
Jul 8, 2024

Conversation

jbrown-xentity
Copy link
Contributor

Fix syntax. Validated via JSON lint.

Fix syntax. Validated via JSON lint.
Update version
Copy link
Member

@tdlowden tdlowden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for quick action! Looks good to me.

@btylerburton btylerburton merged commit 8b7dfd8 into main Jul 8, 2024
4 checks passed
@btylerburton btylerburton deleted the bugfix/gtm-syntax branch July 8, 2024 15:14
@@ -11,14 +11,14 @@

<script type="application/ld+json" class="jsonld-dataset">
dataLayer = [{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to push this object TO anything?
is datalayer created already or do we need to instantiate the var?

Copy link
Member

@tdlowden tdlowden Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btylerburton This would be the next thing I try if the syntax fixes dont work. Made comment here: GSA/data.gov#4783 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if window.dataLayer exists already this would replace it with this. Typically, you'd push so as not to wipe/replace anything pre-existing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I don't think that the dataLayer exists prior, but I'm not sure how to test that. Definitely very open to advice/contributions for the front end stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants